package demo6;

import java.util.Date;

public class Registration {
    private int registrationId;
    private int activityId;
    private String registrantName;
    private String registrantContact;
    private Date applicationTime;
    private boolean isPresent;

    public Registration(int registrationId, int activityId, String registrantName, String registrantContact, Date applicationTime, boolean isPresent) {
        this.registrationId = registrationId;
        this.activityId = activityId;
        this.registrantName = registrantName;
        this.registrantContact = registrantContact;
        this.applicationTime = applicationTime;
        this.isPresent = isPresent;
    }

    // 报名添加
    public static Registration addRegistration(int registrationId, int activityId, String registrantName, String registrantContact, Date applicationTime, boolean isPresent) {
        return new Registration(registrationId, activityId, registrantName, registrantContact, applicationTime, isPresent);
    }

    // 报名查询
    public void queryRegistration() {
        System.out.println("报名编号: " + registrationId);
        System.out.println("活动编号: " + activityId);
        System.out.println("报名人姓名: " + registrantName);
        System.out.println("报名人联系方式: " + registrantContact);
        System.out.println("报名申请时间: " + applicationTime);
        System.out.println("报名是否到场: " + isPresent);
    }

    // 报名结束
    public void endRegistration() {
        System.out.println("报名已结束");
    }
}